<template>
  <div class="hello">
    <el-form ref="form" :model="UserForm " label-position="left" label-width="180px">
      <el-form-item label="真实姓名" prop="truename">
        <el-input v-model="UserForm.truename"></el-input>
      </el-form-item>
      <el-form-item label="年龄" prop="age">
        <el-input v-model="UserForm.age"></el-input>
      </el-form-item>
      <el-form-item label="出生年月">
        <el-date-picker type="date" placeholder="选择日期"
                        v-model="UserForm.birthday">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="submitInfo">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'Login',
  methods: {
    login() {
      this.$http.post('/api/user/login',{"username": this.username,"password": this.password}).then((response) =>{
        // 响应成功回调
        console.log(response);
      },(response) => {
        // 响应失败回调
        console.log(response);
      })
  }
  },
  data () {
    return {
      UserForm: {
        truename: '',
        age: '',
        birthday: ''
      }
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  h1{
    -webkit-text-fill-color: cornflowerblue;
  }
  .hello {
    background: whitesmoke;
    position: relative;
    width: 70%;
    margin: 3% auto 0 auto;
    text-align: center;
    border-radius: 15px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -o-border-radius: 15px;
  }
  input[type="text"] {
    width: 70%;
    padding: 1em 2em 1em 3em;
    color: #9199aa;
    font-size: 18px;
    outline: none;
    border: none;
    font-weight: 100;
    border-bottom: 1px solid#484856;
    margin-top: 2em;
  }

  input[type="password"]{
    width: 70%;
    padding: 1em 2em 1em 3em;
    color: #dd3e3e;
    font-size: 18px;
    outline: none;
    border: none;
    font-weight: 100;
    border-bottom: 1px solid#484856;
    margin-bottom: 3em;
  }
  .login{
    font-size: 20px;
    color: #fff;
    background: cornflowerblue;
    outline: none;
    border: none;
    width: 50%;
    padding: 15px 0;
    cursor: pointer;
  }


</style>
